package com.aspose.cells;

class zlh extends zlc implements zagk {
   private int h;

   public zlh(zaay var1, zzi var2, zagu[] var3, int var4, int var5, int var6) {
      super(var1, var2, var3, var4, var5);
      this.h = var6;
   }

   public zagi a(zaay var1) {
      zagu[] var2 = new zagu[this.c.length];
      System.arraycopy(this.d, 0, var2, 0, var2.length);
      return new zlh(var1 == null ? this.a : var1, this.b, var2, this.e, this.f, this.h);
   }

   public void b(zaay var1) {
      super.b(var1);
      if (this.d.length > 1) {
         for(int var2 = 0; var2 < this.c.length; ++var2) {
            if (var2 != this.h && this.c[var2] != null) {
               this.d[var2] = this.c[var2].e(var1);
            }
         }
      }

   }

   public zagu a(zagu var1) {
      if (this.g) {
         zagu[] var2 = new zagu[this.d.length];
         if (var2.length > 1) {
            System.arraycopy(this.d, 0, var2, 0, var2.length);
         }

         var2[this.h] = var1;
         return new zzi(this.b.d(), this.b.l(), var2);
      } else {
         this.d[this.h] = var1;
         this.b.k();
         return this.b;
      }
   }

   public zagu a(zagu var1, boolean var2) {
      this.d[this.h] = var1;
      if (var2) {
         if (this.b.c(this.a, true)) {
            return null;
         }
      } else if (this.g && this.b.c(this.a, true)) {
         zagu[] var3 = new zagu[this.d.length];
         System.arraycopy(this.d, 0, var3, 0, var3.length);
         return new zzi(this.b.d(), this.b.l(), var3);
      }

      this.b.k();
      return this.b.d(this.a);
   }
}
